<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0036)http://w.gtja.co/client/system/login -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
<title>飞百客微信后台管理系统</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/login.css">
<script type='text/javascript' src="__PUBLIC__/js/jquery.min.js"></script>
</head>
<body>
	<div class="login_warp">
		<div class="login_warp_top"></div>
		<div class="login_warp_bottom">
			<div class="cloud"></div>
			<div class="person"></div>
		</div>
		<div class="login_box">
			<div class="title"></div>
			<form id="dataForm">
				<label style="background-image: url(__PUBLIC__/admin/images/user.png)">
					<span></span>
					<input id="name" name="name" type="text" placeholder="用户名">
				</label>
				<label style="background-image: url(__PUBLIC__/admin/images/passward.png)">
					<input id="pass" name="pass" type="password" placeholder="密码" >
				</label>
				<label style="margin-bottom:10px;">
					<button class="queryButton" onclick="formSubmit(this);return false;">登 录</button>
				</label>
				<label>
					<span id="login_msg" style="padding-left:10px;font-size:14px"></span>
				</label>
			</form>
		</div>
	</div>
<script>
(function(){
	var a=$(".login_warp").width()-157;
	$(function(){
		$(".cloud").animate({left:"-1200px"},8000);
		$(".person").animate({left:a},8000);
	})
	 //输入框的回车事件
    $("input[name=pass],input[name=name]").keypress(function(event){
        if(event.keyCode=='13'){
            $('.queryButton').click();
        }
    });
})(jQuery)

//登录操作
function formSubmit(obj){
    $.post(
        "{:U('Index/signIn')}",
        $('#dataForm').serializeArray(),
        function(res){
            if(res.status==1){
            	set_msg(res.info);
                setTimeout("location.href='"+res.url+"'",1500);return;
            }else{
            	set_msg(res.info,'2');
            }
        },'json');
}

function set_msg(msg,type){
	if(msg == undefined || msg == null) return false;
	if(type == undefined || type == null) type = '1';
	$('#login_msg').text(msg);
	type == '1'?$('#login_msg').css('color','green') : $('#login_msg').css('color','red');
}

</script>	
</body>
</html>